﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
  
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class CGAlgorithms
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class CGAlgorithms
   ">
    <meta name="generator" content="docfx 2.40.12.0">
    
    <link rel="shortcut icon" href="../images/favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    
    <meta property="docfx:rel" content="../">
    
  </head>
  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>
        
        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              
              <a class="navbar-brand" href="../index.html">
                <img id="logo" class="svg" src="../images/logo.svg" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>
        
        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div class="container body-content">
        
        <div id="search-results">
          <div class="search-list"></div>
          <div class="sr-items">
            <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
          </div>
          <ul id="pagination"></ul>
        </div>
      </div>
      <div role="main" class="container body-content hide-when-search">
        
        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms">
  
  
  <h1 id="Mapsui_Geometries_Utilities_CGAlgorithms" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms" class="text-break">Class CGAlgorithms
  </h1>
  <div class="markdown level0 summary"><p>Specifies and implements various fundamental Computational Geometric algorithms.
The algorithms supplied in this class are robust for double-precision floating point.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><span class="xref">System.Object</span></div>
    <div class="level1"><span class="xref">CGAlgorithms</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="Mapsui.Geometries.Utilities.html">Mapsui.Geometries.Utilities</a></h6>
  <h6><strong>Assembly</strong>: Mapsui.Geometries.dll</h6>
  <h5 id="Mapsui_Geometries_Utilities_CGAlgorithms_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static class CGAlgorithms : object</code></pre>
  </div>
  <h3 id="fields">Fields
  </h3>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_Clockwise.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.Clockwise%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L15">View Source</a>
  </span>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_Clockwise" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Clockwise">Clockwise</h4>
  <div class="markdown level1 summary"><p>A value that indicates an orientation of clockwise, or a right turn.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public const int Clockwise = null</code></pre>
  </div>
  <h5 class="fieldValue">Field Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_Collinear.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.Collinear%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L35">View Source</a>
  </span>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_Collinear" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Collinear">Collinear</h4>
  <div class="markdown level1 summary"><p>A value that indicates an orientation of collinear, or no turn (straight).</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public const int Collinear = null</code></pre>
  </div>
  <h5 class="fieldValue">Field Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_CounterClockwise.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.CounterClockwise%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L25">View Source</a>
  </span>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_CounterClockwise" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.CounterClockwise">CounterClockwise</h4>
  <div class="markdown level1 summary"><p>A value that indicates an orientation of counterclockwise, or a left turn.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public const int CounterClockwise = null</code></pre>
  </div>
  <h5 class="fieldValue">Field Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_Left.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.Left%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L30">View Source</a>
  </span>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_Left" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Left">Left</h4>
  <div class="markdown level1 summary"><p>A value that indicates an orientation of counterclockwise, or a left turn.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public const int Left = null</code></pre>
  </div>
  <h5 class="fieldValue">Field Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_Right.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.Right%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L20">View Source</a>
  </span>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_Right" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Right">Right</h4>
  <div class="markdown level1 summary"><p>A value that indicates an orientation of clockwise, or a right turn.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public const int Right = null</code></pre>
  </div>
  <h5 class="fieldValue">Field Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_Straight.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.Straight%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L40">View Source</a>
  </span>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_Straight" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Straight">Straight</h4>
  <div class="markdown level1 summary"><p>A value that indicates an orientation of collinear, or no turn (straight).</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public const int Straight = null</code></pre>
  </div>
  <h5 class="fieldValue">Field Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
  </h3>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_ClosestPoint_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.ClosestPoint(Mapsui.Geometries.Point%2CMapsui.Geometries.Point%2CMapsui.Geometries.Point)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L48">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_ClosestPoint_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.ClosestPoint*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_ClosestPoint_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.ClosestPoint(Mapsui.Geometries.Point,Mapsui.Geometries.Point,Mapsui.Geometries.Point)">ClosestPoint(Point, Point, Point)</h4>
  <div class="markdown level1 summary"><p>Computes the closest point on this line segment to another point.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static Point ClosestPoint(Point p, Point lineSegFrom, Point lineSegTo)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">p</span></td>
        <td></td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">lineSegFrom</span></td>
        <td></td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">lineSegTo</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><p>A Coordinate which is the closest point on the line segment to the point p.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_DistanceLineLine_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.DistanceLineLine(Mapsui.Geometries.Point%2CMapsui.Geometries.Point%2CMapsui.Geometries.Point%2CMapsui.Geometries.Point)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L192">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_DistanceLineLine_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.DistanceLineLine*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_DistanceLineLine_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.DistanceLineLine(Mapsui.Geometries.Point,Mapsui.Geometries.Point,Mapsui.Geometries.Point,Mapsui.Geometries.Point)">DistanceLineLine(Point, Point, Point, Point)</h4>
  <div class="markdown level1 summary"><p>Computes the distance from a line segment AB to a line segment CD.
Note: NON-ROBUST!</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static double DistanceLineLine(Point a, Point b, Point c, Point d)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">a</span></td>
        <td><p>A point of one line.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">b</span></td>
        <td><p>The second point of the line (must be different to A).</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">c</span></td>
        <td><p>One point of the line.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">d</span></td>
        <td><p>Another point of the line (must be different to A).</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Double</span></td>
        <td><p>The distance from line segment AB to line segment CD.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_DistancePointLine_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.DistancePointLine(Mapsui.Geometries.Point%2CMapsui.Geometries.Point%2CMapsui.Geometries.Point)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L116">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_DistancePointLine_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.DistancePointLine*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_DistancePointLine_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.DistancePointLine(Mapsui.Geometries.Point,Mapsui.Geometries.Point,Mapsui.Geometries.Point)">DistancePointLine(Point, Point, Point)</h4>
  <div class="markdown level1 summary"><p>Computes the distance from a point p to a line segment AB.
Note: NON-ROBUST!</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static double DistancePointLine(Point p, Point a, Point b)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">p</span></td>
        <td><p>The point to compute the distance for.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">a</span></td>
        <td><p>One point of the line.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">b</span></td>
        <td><p>Another point of the line (must be different to A).</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Double</span></td>
        <td><p>The distance from p to line segment AB.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_DistancePointLinePerpendicular_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.DistancePointLinePerpendicular(Mapsui.Geometries.Point%2CMapsui.Geometries.Point%2CMapsui.Geometries.Point)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L165">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_DistancePointLinePerpendicular_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.DistancePointLinePerpendicular*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_DistancePointLinePerpendicular_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.DistancePointLinePerpendicular(Mapsui.Geometries.Point,Mapsui.Geometries.Point,Mapsui.Geometries.Point)">DistancePointLinePerpendicular(Point, Point, Point)</h4>
  <div class="markdown level1 summary"><p>Computes the perpendicular distance from a point p
to the (infinite) line containing the points AB</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static double DistancePointLinePerpendicular(Point p, Point a, Point b)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">p</span></td>
        <td><p>The point to compute the distance for.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">a</span></td>
        <td><p>One point of the line.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">b</span></td>
        <td><p>Another point of the line (must be different to A).</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Double</span></td>
        <td><p>The perpendicular distance from p to line AB.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_Length_IList_Mapsui_Geometries_Point__.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.Length(IList%7BMapsui.Geometries.Point%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L278">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_Length_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Length*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_Length_IList_Mapsui_Geometries_Point__" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Length(IList{Mapsui.Geometries.Point})">Length(IList&lt;Point&gt;)</h4>
  <div class="markdown level1 summary"><p>Computes the length of a linestring specified by a sequence of points.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static double Length(IList&lt;Point&gt; pts)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">IList</span>&lt;<a class="xref" href="Mapsui.Geometries.Point.html">Point</a>&gt;</td>
        <td><span class="parametername">pts</span></td>
        <td><p>The points specifying the linestring.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Double</span></td>
        <td><p>The length of the linestring.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_Project_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.Project(Mapsui.Geometries.Point%2CMapsui.Geometries.Point%2CMapsui.Geometries.Point)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L64">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_Project_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Project*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_Project_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.Project(Mapsui.Geometries.Point,Mapsui.Geometries.Point,Mapsui.Geometries.Point)">Project(Point, Point, Point)</h4>
  <div class="markdown level1 summary"><p>Compute the projection of a point onto the line determined
by this line segment.
Note that the projected point  may lie outside the line segment.
If this is the case,  the projection factor will lie outside the range [0.0, 1.0].</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static Point Project(Point p, Point lineSegFrom, Point lineSegTo)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">p</span></td>
        <td></td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">lineSegFrom</span></td>
        <td></td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">lineSegTo</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_ProjectionFactor_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.ProjectionFactor(Mapsui.Geometries.Point%2CMapsui.Geometries.Point%2CMapsui.Geometries.Point)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L85">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_ProjectionFactor_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.ProjectionFactor*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_ProjectionFactor_Mapsui_Geometries_Point_Mapsui_Geometries_Point_Mapsui_Geometries_Point_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.ProjectionFactor(Mapsui.Geometries.Point,Mapsui.Geometries.Point,Mapsui.Geometries.Point)">ProjectionFactor(Point, Point, Point)</h4>
  <div class="markdown level1 summary"><p>Compute the projection factor for the projection of the point p
onto this <code>LineSegment</code>. The projection factor is the constant k
by which the vector for this segment must be multiplied to
equal the vector for the projection of p.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static double ProjectionFactor(Point p, Point lineSegFrom, Point lineSegTo)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">p</span></td>
        <td></td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">lineSegFrom</span></td>
        <td></td>
      </tr>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a></td>
        <td><span class="parametername">lineSegTo</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Double</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms_SignedArea_Mapsui_Geometries_Point___.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms.SignedArea(Mapsui.Geometries.Point%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L256">View Source</a>
  </span>
  <a id="Mapsui_Geometries_Utilities_CGAlgorithms_SignedArea_" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.SignedArea*"></a>
  <h4 id="Mapsui_Geometries_Utilities_CGAlgorithms_SignedArea_Mapsui_Geometries_Point___" data-uid="Mapsui.Geometries.Utilities.CGAlgorithms.SignedArea(Mapsui.Geometries.Point[])">SignedArea(Point[])</h4>
  <div class="markdown level1 summary"><p>Returns the signed area for a ring.  The area is positive ifthe ring is oriented CW.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static double SignedArea(Point[] ring)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="Mapsui.Geometries.Point.html">Point</a>[]</td>
        <td><span class="parametername">ring</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Double</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
</article>
          </div>
          
          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <div class="contribution">
                <ul class="nav">
                  <li>
                    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Geometries_Utilities_CGAlgorithms.md&amp;value=---%0Auid%3A%20Mapsui.Geometries.Utilities.CGAlgorithms%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
                  </li>
                  <li>
                    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Geometries/Utilities/CGAlgoritm.cs/#L10" class="contribution-link">View Source</a>
                  </li>
                </ul>
              </div>
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
              <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
              </nav>
            </div>
          </div>
        </div>
      </div>
      
      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
            
            <span>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>
    
    <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
    <script type="text/javascript" src="../styles/docfx.js"></script>
    <script type="text/javascript" src="../styles/main.js"></script>
  </body>
</html>
